< previous page page_274 next page >

Page 274
0274-01.jpg
Figure 12.23
The 
MultiSelect property allows the selection of a range of days.
The DTPicker Control
The DTPicker (or DateTimePicker) control combines the calendar functionality of the MonthView control with the ability to type a date manually. This control allows users who know the exact date to enter it quickly, and at the same time, it makes a calendar available for those people who need it. The DTPicker looks like a combo box, but when you click the drop-down arrow, a MonthView control appears. Both states of the DTPicker control are shown in Figure 12.24.
0274-02.jpg
Figure 12.24
The DTPicker control allows both
graphical and text input of dates.
Many of the same properties available in the MonthView control are available in the DTPicker control. However, unlike the MonthView, the DTPicker cannot display multiple months at the same time.
Because the DTPicker control allows manual entry of dates, a few parameters are used to determine their format. You can set the Format parameter to any of the following values:
0 dtpLongDateDisplays the Long Date format, as defined in Control Panel.
1 dtpShortDate(default) Displays the Short Date format, as defined in Control Panelusually M/D/YY.
2 dtpTimeDisplays only the time portion of the date value. When this setting is selected, the drop-down button is replaced by up/down arrows, and the calendar does not appear.
3 dtpCustomDisplays a custom date format.
When you set this control to 3 dtpCustom, you can supply your own format string in the Custom property. Several formats are shown in Figure 12.25.

 
< previous page page_274 next page >